<!-- 父组件App.vue -->
<template>
    <!--务必看懂下面这一行代码，:b表示表达式，否则就是字符串-->
    <h2 a="1+1" :b="1 + 1" c="x" :d="x" ref="qwe"></h2>
    <!-- <Person a="哈哈" /> -->
    <Person a="哈哈" :list="personList" v-if="isShow" />
</template>

<script lang="ts" setup name="App">
import Person from './components/Person.vue';
import { reactive, ref, onMounted } from 'vue';
import { type Persons } from '@/types';
let x = 9;
let personList = reactive<Persons>([
    { id: 'sfsdfsda01', name: '张三', age: 18 },
    { id: 'sfsdfsda02', name: '李四', age: 20 },
    { id: 'sfsdfsda03', name: '王五', age: 22 },
]);
console.log(personList);
let isShow = ref(true);
onMounted(() => {
    console.log('父-----挂载完毕');
});
</script>

<style>
/* 样式 */
</style>
